home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 1999 #3
/
Amiga Plus CD - 1999 - No. 3.iso
/
System
/
mainactor
/
rexx
/
convert.ma
next >
Wrap
Text File
|
1977-12-31
|
3KB
|
88 lines
/*
* Convert V1.1, 1993 Markus Moenig
*
* Converts the source project to the format selected by the
* source modules saver module.
*
* You will be asked for the name of the new animation/picture list.
*
* If an animation has to be build, it will get the
* loop and cpf status of the source.
*
* The new project will then be loaded into a new project window.
*/
OPTIONS RESULTS
ADDRESS MAINACTOR
ScreenToFront /* flip screen to front */
/* print message */
PrintAndStoreTXT "Convert V1.1, converting project ..."
GetSPName
IF rc = 0 THEN DO /* check if project loaded */
PARSE VAR RESULT firstname secondname . /* store name of the animation */
/* or the names of the picture list */
GetSPLoader
PARSE VAR RESULT loadertype loadername . /* store type, name of loader module */
GetSPSaver
PARSE VAR RESULT savertype savername . /* store type, name of saver module */
/* Store general infos of the project */
GetSPInfo
PARSE VAR RESULT width height colors pics caching loop cpf .
RequestSaveFile "Select Name of Project" /* Ask for Project Name */
IF RC = 10 THEN DO
PrintTXT "Aborting ..."
EXIT
END
newname = RESULT /* new name = RESULT */
SelectAll /* select all frames/pictures */
/* Build arguments for Save function */
saveargs=newname || " " || cpf || " " || loop
Save saveargs /* Build new animation with */
/* arguments of the old one */
/* If new project is a picture list */
/* cpf and loop will be ignored */
IF caching = "CACHING=YES" THEN /* Was the old project cached ? */
OpenNewProject "CACHING" /* If yes new project is also cached */
ELSE
OpenNewProject /* If not new project is not cached */
SetSPLoader savertype savername /* Set the new projects loader module */
/* to the old projects saver module */
if savertype = "ANIM" THEN DO /* If new project is an anim project */
LoadProject newname /* Load animation */
END
ELSE DO /* if new project is a pic list */
/* generate names of first and last pic */
firstpic=newname || "." || Right("00000" || 1, 5)
lastpic=newname || "." || Right("00000" || pics, 5)
LoadProject firstpic lastpic /* Load picture list */
END
END